#!/bin/sh -e

./configure \
    --prefix=/usr \
    --sysconfdir=/etc

make
make DESTDIR="$1" install

clinst -Dm755 -t "$1/etc/ssl" update-certdata.sh 

# Link ca-certificates to cert.pem
ln -s ../cert.pem "$1/etc/ssl/certs/ca-certificates.crt"
